Joey Hess [Tue, 23 Sep 2025 17:02:24 +0000 (13:02 -0400)]
fix windows build
Joey Hess [Tue, 23 Sep 2025 16:54:33 +0000 (12:54 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 23 Sep 2025 16:52:55 +0000 (12:52 -0400)]
invalidate recorded content identifier tree when export changes
Fix bug that made changes to a special remote sometimes be missed when
importing a tree from it. The diff import would miss when a change was
exported, then manually undone on the special remote (eg deleting a newly
exported file). A full import is needed to catch such changes.
After upgrading, any such missed changes will be included in the next
tree imported from a special remote. This happens because the previously
recorded content identifier tree does not have export information included,
so it is treated as invalid, and a full import is done.
Fixes reversion introduced in version 10.
20230626, commit
40017089f268391f79226592850b58855cdbf808
Unfortunately, this does mean that after each export, the next import will
be a full import. Which can take significantly longer than the diff import
does, when there are a lot of files in the tree.
It would be better if exporting also update the content identifier tree.
However, I don't know if that can be done inexpensively. It would be future
optimisation work, in any case.
(That could only be done for an export that is run in the same
repository as the import. When an export is run in a different repository,
the export.log gets updated, and that propagates to the repository where
import is later run. At that point, a full import is done.)
Sponsored-by: Luke T. Shumaker
Joey Hess [Tue, 23 Sep 2025 15:34:16 +0000 (11:34 -0400)]
remove accidentially added debug prints
yarikoptic [Tue, 23 Sep 2025 14:26:07 +0000 (14:26 +0000)]
yarikoptic [Tue, 23 Sep 2025 14:24:30 +0000 (14:24 +0000)]
Windows still FTBFS
Joey Hess [Tue, 23 Sep 2025 03:55:22 +0000 (23:55 -0400)]
thought
Joey Hess [Tue, 23 Sep 2025 03:48:46 +0000 (23:48 -0400)]
worse
Joey Hess [Mon, 22 Sep 2025 23:30:02 +0000 (19:30 -0400)]
promote forum post to bug, analysis
Joey Hess [Mon, 22 Sep 2025 19:00:26 +0000 (15:00 -0400)]
fix test suite
dfbf76e2ca50d31eca6dee253c5bf3c892301463 broke it.
enableremote with the same type= as initremote had before might be worth
allowing, but I'll wait and see if someone else complains
Joey Hess [Mon, 22 Sep 2025 18:56:50 +0000 (14:56 -0400)]
prevent deadlock when reconcileStaged runs restagePointerFiles
Fix hang that could occur when using git-annex adjust on a branch with a
number of files greater than annex.queuesize. Or potentially other
commands.
When reconcileStaged is running, the database is being opened. But
restagePointerFiles closes the database, and later writes to it. So it will
deadlock if called by reconcileStaged.
The deadlock occurred when the git queue happened to be full, causing
adding a call to restagePointerFiles to it to flush the queue and
restagePointerFiles to run at the wrong time.
Fixed by making reconcileStaged, when it populates or depopulates a pointer
file, arrange for restagePointerFiles to be run as a cleanup action, rather
than from the git queue.
But, what if restagePointerFiles is already in the git queue before
reconcileStaged is run? If it adds anything else to the git queue, causing
the queue to flush, it would still deadlock. To avoid this hypothetical
situation, added a Annex.inreconcilestaged, and made restagePointerFiles
check it and not do anything.
Note that, I did consider the simpler approach of only running
restagePointerFiles as a cleanup action, rather than from the git queue.
But see commit
6a3bd283b8af53f810982e002e435c0d7c040c59 for why it was made
to use the queue in the first place. I wanted to avoid tying this bug fix
to a behavior change.
Sponsored-by: mycroft
Joey Hess [Mon, 22 Sep 2025 16:07:16 +0000 (12:07 -0400)]
update
Joey Hess [Mon, 22 Sep 2025 15:19:13 +0000 (11:19 -0400)]
comment
Joey Hess [Mon, 22 Sep 2025 15:15:32 +0000 (11:15 -0400)]
comment
Joey Hess [Mon, 22 Sep 2025 15:10:32 +0000 (11:10 -0400)]
comment
Joey Hess [Mon, 22 Sep 2025 15:02:24 +0000 (11:02 -0400)]
comment
Joey Hess [Mon, 22 Sep 2025 14:54:16 +0000 (10:54 -0400)]
enableremote: Disallow using type= to attempt to change the type of an existing remote
Changing the type out from under an existing special remote exposes the
existing config to something that may interpret it wildly differently. As
seen in the bug report, this can even result in behavior that makes
git-annex say it's buggy. So prevent the user from doing this. --sameas is
the better way.
Sponsored-by: Kevin Mueller
Joey Hess [Mon, 22 Sep 2025 14:27:16 +0000 (10:27 -0400)]
comment
Joey Hess [Mon, 22 Sep 2025 14:20:36 +0000 (10:20 -0400)]
Add git-remote-p2p-annex and git-remote-tor-annex to standalone builds
matrss [Sat, 20 Sep 2025 17:54:22 +0000 (17:54 +0000)]
Joey Hess [Thu, 18 Sep 2025 15:59:22 +0000 (11:59 -0400)]
fix windows build
Joey Hess [Thu, 18 Sep 2025 15:54:51 +0000 (11:54 -0400)]
response
Joey Hess [Thu, 18 Sep 2025 15:07:20 +0000 (11:07 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
yarikoptic [Tue, 16 Sep 2025 20:48:22 +0000 (20:48 +0000)]
FTBFS on Windows
Joey Hess [Tue, 16 Sep 2025 20:38:54 +0000 (16:38 -0400)]
typo
yarikoptic [Tue, 16 Sep 2025 19:34:27 +0000 (19:34 +0000)]
Added a comment
yarikoptic [Tue, 16 Sep 2025 19:33:40 +0000 (19:33 +0000)]
Added a comment
Joey Hess [Tue, 16 Sep 2025 18:58:26 +0000 (14:58 -0400)]
annex.assistant.allowunlocked
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Tue, 16 Sep 2025 18:32:04 +0000 (14:32 -0400)]
fix bug in recent commit
Joey Hess [Tue, 16 Sep 2025 17:45:36 +0000 (13:45 -0400)]
tag repronim based on https://git-annex.branchable.com/forum/Is_there_a_way_to_have_assistant_add_files_locked__63__/#comment-
096bedb2d22d5aae6a51a53179372d4f
Joey Hess [Tue, 16 Sep 2025 17:34:54 +0000 (13:34 -0400)]
improve example
Joey Hess [Tue, 16 Sep 2025 17:27:25 +0000 (13:27 -0400)]
close
Joey Hess [Tue, 16 Sep 2025 17:27:01 +0000 (13:27 -0400)]
use giveup not error
This is not debugging a git-annex bug, so no stack trace needed.
Joey Hess [Tue, 16 Sep 2025 17:22:14 +0000 (13:22 -0400)]
improve error message when SETCREDS overwrites git-annex config
That is not allowed, so it's not a bug in git-annex when it happens and
instead tell the special remote developer how it's messed up.
Note that currently only Remote.External can overwrite the parsed remote
config with a PassedThrough value. PassedThrough values are otherwise
only generated for configs that are not parsed by the remote config
parser.
Sponsored-by: Joshua Antonishen
Joey Hess [Tue, 16 Sep 2025 16:47:21 +0000 (12:47 -0400)]
fixed
Joey Hess [Tue, 16 Sep 2025 15:00:30 +0000 (11:00 -0400)]
close
Joey Hess [Tue, 16 Sep 2025 14:44:04 +0000 (10:44 -0400)]
comment
Joey Hess [Tue, 16 Sep 2025 14:36:19 +0000 (10:36 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Tue, 16 Sep 2025 01:33:10 +0000 (21:33 -0400)]
set locale encoding after fdTohandle
fdToHandle does not set the usual system locale encoding,
so when the Handle is used for any String IO, it needs to be done
manually for correctness.
I don't know if this fixes any bugs. It might eg, fix a bug with
multicast receive of a file.
Sponsored-by: Leon Schuermann
yarikoptic [Tue, 16 Sep 2025 00:40:22 +0000 (00:40 +0000)]
Added a comment
Joey Hess [Mon, 15 Sep 2025 23:58:54 +0000 (19:58 -0400)]
boot libs
Joey Hess [Mon, 15 Sep 2025 23:25:03 +0000 (19:25 -0400)]
work around file-io not setting locale encoding when opening a Handle
Works around this bug https://github.com/haskell/file-io/issues/45
The fix is in Utility.FileIO.CloseOnExec because all use of file-io is
already wrapped through that module. Although perhaps that ought to be
refactored at this point.
I'd hope that file-io will eventually fix this bug, and also provide
CloseOnExec variants of its functions. That would allow depending on the
fixed version, and removing this ugly code.
Note that, functions like readFile that don't care about the encoding
due to reading/writing a ByteString were kept optimally fast by not
setting the encoding. This avoids an IORef read and write per open.
Sponsored-by: Graham Spencer
Joey Hess [Mon, 15 Sep 2025 22:50:42 +0000 (18:50 -0400)]
bug
Joey Hess [Mon, 15 Sep 2025 20:37:53 +0000 (16:37 -0400)]
require_OsPath branch
Joey Hess [Mon, 15 Sep 2025 20:13:25 +0000 (16:13 -0400)]
comment
Joey Hess [Mon, 15 Sep 2025 18:27:45 +0000 (14:27 -0400)]
update
Joey Hess [Mon, 15 Sep 2025 18:25:08 +0000 (14:25 -0400)]
comment
Joey Hess [Mon, 15 Sep 2025 17:49:14 +0000 (13:49 -0400)]
small optimisation
Joey Hess [Mon, 15 Sep 2025 17:42:50 +0000 (13:42 -0400)]
drop problem end characters from filename operating on String not RawFilePath
Fix bug that could cause an invalid utf-8 sequence to be used in a
temporary filename when the input filename was valid utf-8.
Sponsored-by: k0ld
Joey Hess [Mon, 15 Sep 2025 17:15:41 +0000 (13:15 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 15 Sep 2025 17:14:56 +0000 (13:14 -0400)]
fix mispaste of comment
yarikoptic [Mon, 15 Sep 2025 17:11:51 +0000 (17:11 +0000)]
Added a comment
Joey Hess [Mon, 15 Sep 2025 16:15:51 +0000 (12:15 -0400)]
comment
Joey Hess [Mon, 15 Sep 2025 16:07:29 +0000 (12:07 -0400)]
reopen
Joey Hess [Mon, 15 Sep 2025 16:04:06 +0000 (12:04 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Mon, 15 Sep 2025 15:59:37 +0000 (11:59 -0400)]
fix p2phttp worker thread leak with deleted repository LOCKCONTENT
p2phttp: Fix a hang that could occur when used with --directory, and a
repository in the repository got removed.
It could leak up to -J number of worker threads, but this only affected a
client trying to access the deleted repository.
It may be that this could also affect a non-deleted repository, and also
leak a worker thread, if invalid p2p protocol is sent.
yarikoptic [Thu, 11 Sep 2025 15:46:53 +0000 (15:46 +0000)]
Added a comment
yarikoptic [Thu, 11 Sep 2025 12:30:50 +0000 (12:30 +0000)]
Added a comment
psxvoid [Thu, 11 Sep 2025 08:02:08 +0000 (08:02 +0000)]
Added a comment: git annex bundle - questions
psxvoid [Thu, 11 Sep 2025 05:12:30 +0000 (05:12 +0000)]
Added a comment: resolved
Joey Hess [Wed, 10 Sep 2025 18:29:15 +0000 (14:29 -0400)]
noCreateProcessWhile to fix close-on-exec races
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Wed, 10 Sep 2025 17:53:50 +0000 (13:53 -0400)]
always import Utility.Process rather than System.Process
This is groundwork for Utility.Process doing some extra locking, for
which it's important that it's always used for process creation.
Joey Hess [Wed, 10 Sep 2025 17:34:17 +0000 (13:34 -0400)]
windows build fixes
Joey Hess [Wed, 10 Sep 2025 17:21:06 +0000 (13:21 -0400)]
Removed support for building with cryptonite, use crypton.
cryptonite is not maintained and has security problems.
Debian stable includes crypton by now.
Joey Hess [Wed, 10 Sep 2025 16:05:55 +0000 (12:05 -0400)]
Improve performance when used with a local git remote that has a large working tree
git write-tree was being run once per file git-annex acts on when eg,
getting files, which is slow when the remote repository has a large
tree.
onLocal calls quiesce after each action, and quiesce closes the keys db
since [[!commit
ba7ecbc6a9c]]. Which has a relevant comment about
performance. I have not addressed that, the keys db still gets closed and
reopened after each file.
Turns out that, since git write-tree was run by each call to
reconcileStaged, the .git/annex/keysdb.cache value was never the
same as the git index's inode. Because git write-tree updates the index's
mtime even when no changes have been made.
And so, when the database got closed and reopened, reconcileStaged would
see a changed index, and run git write-tree again. Over and over.
I considered writing the index's new inodecache after write-tree to the
keysdb.cache, but that would be vulnerable to a race, if the index was
changed just after write-tree.
The fix was to stop using keysb.cache at all. When the database is closed
and later reopened by the same process, avoid re-doing reconcileStaged.
Now that .git/annex/keysdb.cache is no longer used. It could be removed,
but the time overhead of removing it would be more than the space overhead
of keeping it. Defferred removal to the v11 upgrade.
Sponsored-by: unqueued
Joey Hess [Wed, 10 Sep 2025 14:22:10 +0000 (10:22 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Wed, 10 Sep 2025 14:16:52 +0000 (10:16 -0400)]
bug report
yarikoptic [Tue, 9 Sep 2025 14:36:29 +0000 (14:36 +0000)]
initial report on problem with # in the path
yarikoptic [Tue, 9 Sep 2025 12:47:26 +0000 (12:47 +0000)]
Added a comment
jkrebian [Tue, 9 Sep 2025 07:02:04 +0000 (07:02 +0000)]
Added a comment
waldi5001 [Mon, 8 Sep 2025 10:00:45 +0000 (10:00 +0000)]
rename forum/notes_and_enhancements_git_annex_on_android.mdwn to forum/notes_and_enhancements_for_git_annex_on_android.mdwn
waldi5001 [Mon, 8 Sep 2025 09:55:03 +0000 (09:55 +0000)]
waldi5001 [Mon, 8 Sep 2025 08:47:56 +0000 (08:47 +0000)]
Added a comment
Joey Hess [Sat, 6 Sep 2025 17:38:17 +0000 (13:38 -0400)]
comments
Joey Hess [Fri, 5 Sep 2025 20:19:50 +0000 (16:19 -0400)]
changelog for close-on-exec work
Joey Hess [Fri, 5 Sep 2025 20:18:07 +0000 (16:18 -0400)]
update
Joey Hess [Fri, 5 Sep 2025 20:02:17 +0000 (16:02 -0400)]
open feed file with close-on-exec bit set
parseFeedFromFile does not set the bit, so open and read the file
ourselves.
Versioned dependency on utf8-string should not cause any issues,
that version is available in all all versions of debian that package it.
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Fri, 5 Sep 2025 19:49:33 +0000 (15:49 -0400)]
clarify
Joey Hess [Fri, 5 Sep 2025 19:48:43 +0000 (15:48 -0400)]
update
Joey Hess [Fri, 5 Sep 2025 19:44:43 +0000 (15:44 -0400)]
convert withFile and withBinaryFile to close-on-exec safe versions
At this point, every call in git-annex to withFile, openBinaryFile,
withBinaryFile, appendFile, and openTempFile, readFile, and writeFile
have been converted.
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Fri, 5 Sep 2025 19:37:13 +0000 (15:37 -0400)]
convert all readFile, writeFile, and appendFile to close-on-exec safe versions
Even in the Build system. This allows grepping to make sure that there
are none left un-converted:
git grep "writeFile" |grep -v F\\.| grep -v doc/|grep -v writeFileString | grep -v writeFileProtected |grep -v Utility/FileIO
git grep "readFile" |grep -v F\\.| grep -v doc/|grep -v readFileString |grep -v Utility/FileIO
git grep "appendFile" |grep -v F\\.| grep -v doc/|grep -v appendFileString |grep -v Utility/FileIO
Might be nice to automate that to prevent future mistakes...
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Fri, 5 Sep 2025 18:51:26 +0000 (14:51 -0400)]
add readFileString, writeFileString, appendFileString
Exported by Common, so they will be available everywhere.
These are the same as readFile, writeFile, appendFile.
But have two benefits:
* They take OsPath, so using them avoids converting back and forth
unncessarily.
* They use the close-on-exec flag so can't leak FDs to child processes.
Unlike the standard Haskell versions which unfortunately have that
wart currently. (I do hope the standard versions get fixed
eventually.)
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Fri, 5 Sep 2025 18:07:40 +0000 (14:07 -0400)]
update
Joey Hess [Fri, 5 Sep 2025 18:06:15 +0000 (14:06 -0400)]
update
Joey Hess [Fri, 5 Sep 2025 17:36:50 +0000 (13:36 -0400)]
Utility.FileIO: set close-on-exec flag for all functions
Utility.FileIO.CloseOnExec is largely copied from
System.File.OsPath.Internal with the simple modification of
setting the flag.
Unfortunately, openTempFile does not set the flag when
opening the file, but afterwards, leaving it vulnerable to a race.
A lot of code, including posix and windows specific code,
would need to be copied from file-io in order to fix that.
Still, I consider this implementation a placeholder, it doesn't truely
fix all instances of the problem.
I hope that this will be addressed in file-io itself, see
https://github.com/haskell/file-io/issues/44
Utility.FileIO.CloseOnExec could form the basis of a
file-io-closeonexec library, depending on how things go with that
issue.
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Fri, 5 Sep 2025 16:44:46 +0000 (12:44 -0400)]
turn on OsPath build flag by default
It was already default in stack builds, now it is default in cabal
builds as well.
Add build warnings when git-annex is built without the OsPath build flag.
git-annex version: Report on whether it was built with the OsPath build flag.
Having the flag on by default was always the plan, and this is a good time to
make the change. A bit of added urgency comes from the close-on-exec leak
issue. Fixing that is going to need reimplentation of things like openFile.
Needing to reimplenment it twice is not very appealing, especially since the
FilePath version of it has an implementation that cannot be easily copied and
tweaked. If OsPath is on by default, I can start with only implementing
openFile for it, and fix the bug in that build. And perhaps avoid doing the
extra work that will later get thrown away when this transition finishes.
Note that at this point, Debian still needs to package file-io. Hopefully, they
will package it, rather than turning off the OsPath build flag.
Joey Hess [Fri, 5 Sep 2025 16:05:13 +0000 (12:05 -0400)]
convert all bytestring readFile/writeFile to use Utility.FileIO
This is groundwork for setting the close-on-exec flag when opening
files, which will be done in Utility.FileIO or a similar module using the same
function names. The bytestring library does not set that flag, even though it
could, and IMHO should.
Note that there are many calls to the Prelude's readFile/writeFile/appendFile
still in git-annex, and this does not address those.
Sponsored-by: the NIH-funded NICEMAN (ReproNim TR&D3) project
Joey Hess [Fri, 5 Sep 2025 15:57:08 +0000 (11:57 -0400)]
remove dead code
Joey Hess [Fri, 5 Sep 2025 15:21:38 +0000 (11:21 -0400)]
update
Joey Hess [Fri, 5 Sep 2025 15:17:14 +0000 (11:17 -0400)]
copyFile
Joey Hess [Thu, 4 Sep 2025 22:09:57 +0000 (18:09 -0400)]
on libraries
Joey Hess [Thu, 4 Sep 2025 20:56:19 +0000 (16:56 -0400)]
format
Joey Hess [Thu, 4 Sep 2025 20:40:59 +0000 (16:40 -0400)]
fix format
Joey Hess [Thu, 4 Sep 2025 20:40:50 +0000 (16:40 -0400)]
Revert "try to fix format issue on website"
This reverts commit
764b47d7d49ee13460565f59774c1aded665790f.
Joey Hess [Thu, 4 Sep 2025 20:38:55 +0000 (16:38 -0400)]
try to fix format issue on website
Joey Hess [Thu, 4 Sep 2025 20:31:25 +0000 (16:31 -0400)]
Merge branch 'master' of ssh://git-annex.branchable.com
Joey Hess [Thu, 4 Sep 2025 20:31:09 +0000 (16:31 -0400)]
more